
import 'package:flutter/material.dart';
import 'dart:ui';
import 'package:flutter_screenutil/screenutil.dart';
final  AppStatusBar  =  MediaQueryData.fromWindow(window).padding.top;
final  AppBottom     =  MediaQueryData.fromWindow(window).padding.bottom;
final  AppNaviBar    =  52;
final  AppToolBar    =  (50 + AppBottom);
final  AppWidth      =  ScreenUtil.screenWidthDp;
final  AppHeigh      =  ScreenUtil.screenHeightDp;

class MyColor{
  static const AppColor  = const Color(0Xff007EFE);
  static const AppRed    = const Color(0Xffed5641);
  static const Appf8f8f8 = const Color(0Xfff8f8f8);
  static const Appededed = const Color(0Xffededed);

  static const App333333 = const Color(0Xff333333);
  static const App666666 = const Color(0Xff666666);
  static const App999999 = const Color(0Xff999999);
  static const App000000 = const Color(0xff000000);
  static const AppFFFFFF = const Color(0xffFFFFFF);
  static const Appdddddd = const Color(0xffdddddd);


}
class MyUrl{

  static String getNewUrl(String url){
    var strUrl = url.replaceFirst("/agent/", "");
    return Uri.decodeFull(strUrl);
  }
  static String getUrlForMap(Map map){
    if (map == null) {
      return "";
    }
    String formData = "";
    List item = <String>[];
    map.forEach((key,value)=> item.add("$key=$value"));
    formData = item.join("&");
    return "?$formData";
  }
}
class ImageHelper {
  static String png(String name) {
    return "assets/images/$name";
  }
  static Widget icon(String name, {double width, double height, BoxFit boxFit, Color color}) {
    return Image.asset(
      png(name),
      width: width,
      height: height,
      fit: boxFit,
      color: color,
    );
  }

  static String placeHolder() {
    return "assets/images/bg_image_placeholder.png";
  }

}